fix typos
rule type optimizations
update each rule
min/max rules optimizations