Making use of order_rules()

Stuffed order_rules() into the read_rules procedure to make sure that longest "before" elements are parsed before any of their substrings are.