Add metadata and a visual indicator to newly created HeadingCells.

Also fixes some minor bugs.