cleanups and doc