doc anchors and cleanup