reorganization and reformatting, buffer words calculation properly strips trailing and leading hyphens