Improving qs and qsa