start separating actions
major refactoring
fix test
add support of Deflate and Gzip encoded messages