Fix JSHint warnings/errors.
Replace IOWatcher with socketwatcher.