Merge pull request #11 from ryanlecompte/master

Sync with upstream repo.
Merge pull request #66 from fanhattan/connection-handling-improvements

Connection handling improvements.
Merge branch 'connection-handling-improvements'
Merge pull request #14 from ryanlecompte/master

Merge pull request #66 from fanhattan/connection-handling-improvements
Merge pull request #15 from fanhattan/master

sync