Feat/parse url

This should be less specific - this is a general function.