Moves to use promises which allows both direct and deferred queries and
compare methods
Merge pull request #1 from pflannery/use-promises

Now uses promises which allows deferred query and compare methods