Fixed class hierarchy + fixing