Update rx for #61

This is a cursory upgrade and could be taken further. The tests all
pass, but I want to make sure this really works before cleaning up
further.

@mbossenbroek 
Good question. Just copying what was there :)