Refactor resultset object to support JSON; basic show page for existing queries