Removal of unneeded tags