Adding CoreData support