Command query refactor