Add Time_period class
cleanups