Cleaning up imports and fixing function return type
Cleaning up the imports and fixing the type signature