removed redundant #include statements.
new command line tool 'dumpmetadata' to dump metadata to stdout as XML or Markdown.