Added Fixes and tests for Imperative, refactored scheduler inheritance