Moved some simplification to rule engine.