added close, save, and save as functionality