Added JSON protocol.
Merge branch 'master' into json
Merge branch 'master' into json
Fixed some whitespaces.
Merge branch 'json'
Remove annoying 'socket already in use' error.