Eliminate dead code.
Avoid duplicate code.