More refactors, cleanups, and add #followedBy
Move token length check to #matchesChildren