scheduler api clean-ups and unit test improvements