Cleaning up debug code