Tidy up debugging code.