Qs refactor