Add some basic tests and some more docs