Updated main shell script