refactors url-creation.
Merge pull request #78 from birkin/master

refactors url-creation.