Implemented some save functionality