Urls and directories refactor