Extract helper function in observe
Improve scheduler and slice efficiency

Scheduler also uses a safer algorithm, and maintains a fair ordering of simultaneous tasks by the order in which they were scheduled.
Fix all jshint warnings, port fromEvent-test