Refactored code
Removed unnecessary import in example