Implemented addRule, and updated test output.