Improve tests, fix warnings thrown when generating coverage.