Refactoring registration of time

To own html- and js-files.