rearranging in preparation for removing PortalInternal