Changed two-phase symbol categorization to use top-down recursive expansion