Cleans up class definitions.