doc: Make file headings consistent, and update docstrings per the proposed HACKING guide

Change-Id: I593bc9e6cff83307dca3d87f052872a7819d6a0b