Refactor adding of schedule