New constructor that automatically set hostnames