Refactor CalendarController