some work on jot materialized view
some bug fixes, cleanup