Closes issue #609 and #564

Adds fixes for incorrect usage of `recv` and adds handles default case
for unknown response types.

More changes for #609

This shouldn't affect functionality but is nevertheless more correct.

more is to == changes
Merge branch 'next' into issue_609