slave: Minor refactoring