Continuing to write more unit tests and patching up little inconsistencies