Add documentation and clean code.