Implement straight-forward scheduler.
Refactoring.
Add stuff for correct ranking function.