[#72053390] code refactor as prereq to saving links to queries