Improve request and response encoding
Bump version to 0.5.17