Eliminated redundant validation code.
- Added corresponding unit tests.
Improved test coverage.