Refactor url of prime factors resource