Improved the entity system a bit more