Add extra formatting for queries