Implemented save at the GUI end, not yet tested.