Updated library sample to support service registry