More changes to remove dependence on optional libraries