[cleanup] Minor refactoring