[#8] Refactoring out code for converting primes back into the sent in json away from routing logic