Added template code for Core Data stack