Some work on chapter support.
More work on chapters.