Adds text selection on click
Cleans up the code
Improves text selection on click