Added ugly support for rule editing.