Changed build scripts to use local variables only