refactored global variables into globals.js

moved all of the global variables into a separate globals.js file