Tried to rearrange the code for customizable, prettier output, to aid proofreading.
mend