Adding _.getQuery() and corresponding tests
merge _.getQuery branch from guahanweb