BROKEN: Finished preliminary refactoring.

Separated session out from UI, but RenEx is still unable to apply
renaming.