Added some tests and test documentation