Refactor to create promise-based api calls to fetch schedules.