Separated 'time to' code into own template, renamed some methods, fixed a bug