Clean up classes and write comments