Move extractParams to helper.