more work on scheduling, refactoring and more