Removed global variable pollution

Being friendly to the page environment