Reduced session usage

I realize this is kind of gigantic. Some of the commits are really in master already and result from my not quite perfect understanding of git-rebase. The important ones are:

6758d28a320523e28643502192cd9606d962b6c1
20663b4a7da532e6fed2f0d384935f9125dfafc3
c1ffcb2ad48ae7e31ecfa5611d208bc915976709
2eb5818bc465306ab4ef7a20d4b5d6dd4af2b66d

They're all pretty well commented.