save and save as for code and another minor changes