Fix issue when using GZip and refactor using Q.
Merge pull request #9 from daffl/gzip-fix-q

Fix issue when using GZip and refactor using Q.