Add the global variables

Not all the function included.