Yeah, this has been on the cleanup list from old console. One place in and out would be so much better. The whole approach of talking to a REST backend was meant to be removed as well, so this query building shouldn't be needed anyway.