plug-ins: a lot of coding style cleanup in file-dds.
Still a lot more to do but pushing WIP to not have it wasted if more commits come in from others. Also got rid of some global variables. (cherry picked from commit ff2d22d9)
Showing with 3143 additions and 2985 deletions