Cleaning up debugging code