Significant flattening of the getInteractionParameter logic and localisation of variables