Clean up some documentation and remove a few circular dependencies that
complicate static analysis.