Add QC metrics, other speedups and improvements