QSV: some cleanup.
QSV: more cleanup