Beginning of scheduling and pipelining helpers. Broke something -- going to refactor refining