move some URL functions so they can be overridden by plugins
answers plugin
tweak behaviour of addToArray function