remote inventory work (incomplete), and a few other fixes