WIP for issue #81

Need to test it.
Image saving and work on preview

Image (file saving) now has the changes to rename if there is an existing file of the same name.

Preview should work a little better, needs more changes still.
WIP for issue #73
Initial commit for issue #77 fix