Cleanup of MD