There are almost no unit tests. Need to add a bunch more of them so I can be more sure this works as expected.