Save as functionality implemented properly. Minor changes across many files as well.