Flatten rules