Cleaned up class hierarchy