Major updates to session framework