Clean up the code and add documentation.