Gross websockets-based now.

Added fallback for old-style queries
Copying implemented in action.php