* Environment variables are not thread safe on linux, but unfortunately linux is
obssessed with them so we must hold our nose and interact with them.
* This change tries to move some modifications earlier into init before anything
else happens to reduce the risk of clashes, as well as removing some reads
that are unnecessary.