shell: Factor out set_slave function.
FIXUP: Remove unused variables.
WIP: slaves.