Remove subshell; put `exit` at end of script

This allows us to put `exit` at the end instead of in the middle of the script.