Major improvements to superglobal handler functions