code cleanup, add docheader