Moving some of the socket code in to a controller so we can make it work on the game board

I did this because typically you don't want the same mocha version
across all users of the machine.  If you have installed it across all
users it can removed here:

$rm -fr /usr/local/lib/node_modules/mocha

Then install it in the project

$ npm install