Added completely the SAVE functionality.