Added a bunch more tests and a bit of code
Made some more changes