Implement WriteMetadata
Finish initialize.Initialize