Broken; trying to fix having the wrong scope for the onLoadedImage callbacks.