Wrapped SocketIO in an AngularJS service, cleaned up some JSLint issues