Fixed docs and started writing tests.