swarm: refactory pills (refs #65)