Reduced session usage

The commit message is pretty details. This is far more cleanup than functional change.