Fixed socket polling, command handlers, and ping pong; fixed miscellaneous oversight issues (typos)