Refactored control flow: now, iterating over each parameter. Each
iteration, the modelLocations are type-specifically determined.