analyzer: cleanup & refactoring of websocket example