Added save functionality, opening and saving now working