Formatting/layout improvements - introduce macros for UTF-8 byte detection, add braces. No functional changes.