Refactor qn.