Added a few more tests. Still need some more, but it seems to be working pretty well