Creating the Server class and the "getDomain" function.