Add contents and frontmatter.
Fix capitalization based on table of contents.