Cleaned up debug code