Added removal of metadata tags if empty