Mapping and taking service sessions refactoring