fix up imports and some tests