adding header and cleanup comments