reduce var scope
remove commented out bind/listen error checking.

This all needs to be rewritten someday anyway, and it won't look
anything like this.