Added function to setup global variables in file.
Added load global function.