Cleanup Q_WS_QWS logic