now using function sql_build_q to create sql querys.
insert comment for genWaveHeader().
fixed #37: rmGroup().