Move time JS functions to their own file.