Fix samples to use new 3.1. constructors

@joeblubaugh