phasing out sessions, and removing useless code