Add unique labels and getName() to QueryModel for #132.