Added code for NSCoding, to transition from singlton to storing the data to the filesystem