Implemented persistence with Model class