Restored helpers getUrl and setUrl. Fixes #1996

The restored methods taken from 041331f0becc17012156bc7b39901e0fbd366ce3