Added tests and coverage.