Metadata extractor plugin and some minor fixes

Done.