moved extractMetadata into Photo class