GPG key retrieval fix + queries functions removal