Refactored component system and added entity hierarchy