move build up server socket events to a helper class
CoffeeScript style main.js code. Next step is refector this code to more beautiful