Code cleanup
Move some variables to globals.html

Reviewer: Tiff Go

Issues: Cleanup