refactors portal and mock_portal resources to their own space