Minor refactoring

[skip ci]