Refactored the GameLoop into a new interface and a separate
implementation.