Schedule.pm refactored