Session class reorganized