Removing useless conditions