Removed session and added debug to global