Improved constructURL