All ambiguous names changed, helpers fixed with callbacks.

I changed all the various ambiguous names to more clear ones, and I made all the various steps incurred in url.js to separate function calls. This will make the code easier to read, test, refactor and debug.