Automatically generate paramerter values and remove parameters which are no longer needed