And yet more cleanup and fixes