Create New, getHost and getPort functions