Updated scripts so they set more env variables and can be run in succession using the variables created by previous scripts