Updates and cleanups to cpp mode.

Summary:

Test Plan:

Reviewers:

CC:
updates