Refactor display of swarms on index page