Added new security features, started impoving session class.