qbk refactor