Cleaning up compiler configuration in build script.
Fixing bad variable read crash. Including some relevent comments.