Refactoring a few querying methods

Just a couple of minor refactorings :) Thanks for a great GoGaRuCo talk!!