Refactoring for new pyglet flow.