cleaning up WebSocketCore

I removed unneccesarry helper functions, comments and added JsDoc style api
descriptors. It now looks quite tiddy lets see how this will change when
rebinding the messages.