Added unit tests and coverage.