Minor refactoring.
Added integration tests for param type checking.