World.py: Moved helper functions into utils.py