Metadata extractor plugin and some minor fixes

What's the purpose of this sleep call?