Delete old functions, fix time issue