Lastest additions to the restore code.