Added some tests and other stuff