IPC: move partner session code to PartnerSession class (wip)