More robust timekeeping and initial setup.