A few more adaptations and fixes