fix imports and reduce warnings