clean up warnings and debug printouts