[PM] Cleanup formatting and namespace commenting. Mostly done with
clang-format, but with some modifications by me where it got things
wrong or got confused.