WIP: scheduling refactor