Update scripts to use environment variables