Update mode and group for priv key. Clean up serialized resource unpacking