Add slave controller and move some of the master directive features into the slave controller.