add debug infos, comment unused functions