Implemented some more code for saving selections.