Added a few more tests (And fixed a bug).