Introduce scheduler abstraction