Removing redundant tags