Fix the patch so that f-spot builds correctly
Try to implement the dispose pattern correctly

Also split out some classes into their own file