[WIP] Refacto displaying query