cleanup Rule by removing state from it; introduce a TextLevelRule; cleanup GenericUnpairedBracketsRule