Split up timer() into multiple functions
MERRRRRGE