cleanup md api