Refactor session integration