Refactor StripParams into separate methods