Almost finished. Still seg faults when opening slug.gif twice on ffox