cleaning warnings and setting debug levels