style(metadata_extractor): code cleanup

Closes #1312