Code and docs cleanup.