Documented code and fix one error