changes to session and some leftovers