Debug code tidy.