Optimized code for reverse phone ruby app (reviewed by Udit).