Update comment to reflect widened use of sort_by_length
Refactor the definition scope code

Total overhaul and simplification, on the cusp of being sturcutrally
agnostic. Per #200.
Change comment style

Per #170.