Fix some minor coding style issues.
Fix one new line in generator_txt header.
Add const refs where I see.
I change meaning of ADD_WIDGET() macros forward/back in eae250a8a6.