Some style fixes and also reintroduced process sessions which got lost in some refactorings.