Making Scheduler API injectable

@SimonCropp @andreasohlund please review