Lots of optimization.

Main query now uses elasticsearch data directly for rendering