GIF testing, util code abstraction, cleanup, image resource fixes.