Qc priority

Adding in priority code, interim but functional.