Change AtomFactory to RuleFactory