Adding scheduler, fixed build issues.