Improve dumping for rules, and documentation of same