Scheduler tweaks

Some commits extracted from #186