Fixes issues in the class hierarchy and organization.