Some optimisations, mainly regarding loading of urls cache

Ref #1363