gzip feature and minor fixes