Intermediate commit. Fixed docs issues and added some more tests.