document code cleanup