client.py:
- query implementations share more code in common
- more informative exceptions are thrown on error
filters.py:
- added build_filter method for better readability
- more informative exceptions are thrown on error