Add the url module
Add the url module
Refactor the api so it's easier to test and add new testcases