Add tests to see if multiple parameters are being set, and more refactoring.