Chaned function location, initial commit for session.c