Revert "Merge pull request #668 from mrxiaohe/metadata-v2"

This reverts commit 920f3634649afc6b444e5d511ea76ad4aec98086, reversing
changes made to a341249edc2ed5b97ece4798aae1cdcbf09f0d1a.

Closes #669.