Reduced the complexity of get_ip and create by extracting methods