Intermediate version to conserve code
First version with metadata retrieval, runs into library bug
Link to generated metadata added