Working with states

Allowed for entities to be updated and drawn by the state. Also added a
bit of code to make worldmaps almsot functional