Improved StockExample and added a getExternalIp-utility method