Removed unnecessary variable declarations
Changed name of session for portability