Cleaning up classes and code