Rewrite to use googleapis module