Moved url-construction to separate function
Merge pull request #42 from mjmaenpaa/constructUrl

Moved url-construction to separate function