Refactor collector_setup.sh, making extraction of the collector list a function