Some minor fixes and test.d adaptation.