Fixed timeframe test and made sure the class will not accept invalid time periods