Sessions overhaul

cc @Sirupsen