Compile: script wide cleanup & reorganization + updated default vendor versions
moved environment detection after collecting env vars + added utils.sh