Moved unarchive to a separate func.