Delete unused imports
Refactor the function run()
Complete getting selected text
Clean code