replacing some printf with qDebug and vice versa

also getting rid of many unneeded \n