Const-correctness, return-after-else, and formatting updates. NFC.