Updating timer functionality

Pause/start timer works with space or enter. Timer runs even when
computer is idle/sleeping.

Code refactored to have less global variables and be more modular.