Implemented ToQueryAsVar helper functions (Closes #7).

All 372 tests pass.