Documented and refactored the majority of Koza module.