Refactor

* gzip encoding
* simplified configuration
* various fixes