make metadata more generic
Merge pull request #489 from LipuFei/improve-metadata

Make metadata more generic