Avoid to expose in a public method the lock.

Exposing lock to any other class can bring to deadlocks if it is not
unlocked properly.
All locks should be done by the class itself.
Removed use of the locks of urlModel.

Can be condition to deadlocks. Locking access to urlModel is the job of
urlModel class, not the caller.
However, some calls will need to be enforced to handle out of bound
values if the model changes between getting the number of elements and
getting all the elements.