Fixes imports and failing tests