Refactor URLs to use resources