Add CoreData support

This code would have been generated by Xcode if I had created this
project and selected "Use CoreData"