fixes metadata function. simplifies readme and externalizes docs for advanced options.