Refactor of Controller logic into schedule object