Some work on the CoreData stuff.