Refactor query template
0.9.7