Refactor into base swarm and master/minion swarm

Additional prep work for multi-master and syndic support.