Refactored position handling of game entities