Added funcdef macro
Wrote query construct spec