Merge pull request #1 from lizhaofeng1998/master

Minor typo fixes
Clean up formatting, moved some code around
Add config value to set IP to bind to
Add server version config
Add socket bind error checking
Replace hardcoded server version with version from . Remove declaration of  (no point in declaring it if we're going to get the real IP right after)
Change back to \n to maintain consistency
Merge pull request #3 from snacsnoc/master

Formatting cleanup and some fixes