Tidying up debug cocging