Added some more tests and functionality