Refactor NoteWebsocketServer