Some fixes to make the tool compile and run again after several dormant years