Refactor urls to use base url