Clean up code and add some documentation.