Code and doc cleanup.