Added delete metadata function.