New implementation of Entity, better implementation of State and StateManager.