added Scheduler interface and simple in-memory implementation