Removal of unneeded code in session class