Added alarm functionality and corrected a horrific bug in the CalculateBedTimes() function