Corrected bug in output of rules triggered. Modified some rules.