Adding more coverage and removing dead code