Changed the way Core Data is used