More tests

I added some more tests and fixed a few edge cases