refactored websocket endpoints, fixed pattern play/stop