Converted Scheduler code to a library.  Kink of cludgy right now, but it works.