Removing redundant expressions