Improve some tests and docblocks