Modified code to take server name from a common place.