Improve tests and coverage.