Start moving all time-related munging and organization code into a separate module. Make a suite of jasmine tests for the new module.