Remove legacy debug code