Some cleanups and doc improvements