fix test coverage and legal headers