Abstracted the timer into its own js file.