Changed s to session in several functions.