Edit templates, add divmod to convert seconds