Updated Main and open save dialog

Reasons for updating main was because the algorithm for checking changes
was not completely functional. There is only one issue that remains.
After making a change and clicking x; when the save menu pops up and
cancel is clicked, the program closes. Not sure how to fix that. Also
fixed the part that saves a file. When cancel was originally clicked, a
message would pop up saying the file null has been saved. Fixed that and
added one small thing to the open save dialog.