increase size of range for URL
arrange function name more descriptively
return null if no matches
improve function for selection range

* create a new range instead of updating of a parameter avoid confusion
* take the inner function outside for readability
minor fix

* fix typo
* add new lines for alignment