PortalKit: refactor client part of FW, but it has not finished yet.