Merge pull request #1051 from hurtonm/master

Small code cleanup
Code cleanup

- limit visibility of pending_connection_t
- add const qualifiers