Several bug fixes.  More work on vineyard queries.