Fix synchronous sending of messages

- create whole string before sending to avoid synchronous sending
Fix typo in ping.coffee
Merge pull request #21 from HarrisYip/master

Fix synchronous sending of messages and typos