code cleanup and header comment