Split example and made the WebSocket Server a library