The scheduler train keeps rolling

Almost entirely refactoring.