Added comments and fixed session header error