Style, comments, small improvements

Indeed. Can you update to use http://nodejs.org/api/url.html module?