Split utility functions that aren't for game logic to internals.py