remove statements that have no side effects