Feature/scheduler refactoring