Overhauled for better backup of global stuff
Don't tamper with $_SERVER in tool namespace