QC refactoring

refactored the start of he command interface for QC may not be
functional atm
Bugfixes in QC

Fixed commands a bit