Adding a few more tests, docs, and reindentings