update unit test coverage, delete dead code.