Start refactoring the basic-run.sh script.