Refactor parameter order testing.

Also remove some unused code.