Added evaluation and parsing for rules.