Beginnings of restore code added.