Remove unnecessary statements.