Moved event handling to a separate file and stopped polling every frame to see if the clock should be hidden.