PortalKit: refactor viewManager