Remove unused queries

fixes #328
fixes #274