many cleanups and new docs