Fix tests after code reorganisation