remove unused if/then/else