Backported some style and documentation changes.