Use only one method for adding meta data to an image.

Refactored and move a bit of code around now that I have things working
properly.