Cleaned up global

Cleaned up and betterified global.js