Fix io test for py 3.x compatibility

Also some minor cleanup items
fix response tests for py 2.6