QS cleanup