Broke out the functionality for getting the external IP address to further structure and improve the codebase