Updated scala API to use cloud-config