Improved WebSocket lifecycle handling. Improved error handling. Trimmed dependencies.