Moved some code out to the timesparser library