some cleanup
refactored client websocket code to use routing