More tests and some work on the documentation