PortalKit: refactor client part of FW, step2