Small improvements, mostly snprintfs to use sizeof.
snprintf sizeof
snprintf sizeof
new file: REFACTORING, showing what to do next.