One Problem Fixed
The problem with the photo gallery turned out to be a partly completed change to the organization structure. I wrote a muletrain script to complete the process. I went back to working the duplicate records problem and wrote a new muletrain command, join, as an aid in solving it.