Added query method and tests.  Made use of Compat package for 0.4 compatibility