CoreData stack and convenience functions.