Update discovery

This code is pretty ugly.  I think it's getting less ugly but it's still pretty incomprehensible.

It does works significantly better though...
You mean a list of lists with ragged length rows?