More refactoring of temporal functions