Added Jeff's changes to QAQC code