Minor cleanup and mksession upgrades