An exercise in Core Data on iOS