Refactor setup.sh