Refactored url handling.
Split url handling off to seperate module from laamaj.