few $_SESSION removed
Globals editing added