scheduler unit tests

Added unit tests for scheduler.
Moved Ref tests to correct package.
Fixed some minor typos in the doc.