Make refactoring of sessions