swarm: refactory pill :pill: