simplified webservice.py and added support for deflate compression