Scheduler: Refactored run method to use graph constructs. Does not handle multiple ports.
Merge Justin's changes