Rename types and add waitformetadata