updates per review

- two-part protocol version (5.0)
- default value for cursor_pos is end of code
- docs, comment, and docstring touchups