Switch element to rule to properly handle ws.
Eliminate use of .exists and .delete.

Switch to proper :exists and :delete.