Fixed some spelling in comments.
Fixed issue with leading spaces causing infinate loop in the parseJSONMessage()