Split word abbreviation into separate function

This is step one in a plan to implement a few different
word-abbreviation approaches, to see which are more efficient.

(It's not exactly unit-testy, but the results of running declaration.txt
through the process before-and-after change were diff'd, and were
identical.)

Also:  made the file PEP8-happy.