move loadGraphics to helper functions; move onKeyDown to events.