in-passing cleanups and doc improvements