made new menu work right and added save-as functionality