Added a deleteMetadata function to Device.