increase code coverage and remove deadcode