Fixed a few bugs; most GIFs found in the wild will now load.
Better error reporting, integrated Josh's suggestions, and moved a few dubiously-named variables around.