Update element.go and generator.go