Pulled timer code out into their own functions.