Rewrote popup.js to use rule id instead of hashCode as identified used for updating view and for cancelling button