v7.22 minor internal refactoring