Minor refactoring [ci skip]