old websocket code cleanup