Split up refine_time into two functions so the calculation can be called separately Closes #159 See merge request !97