Implementing the first version of the save functionality.