Code cleanup. Add image bin dumping code.