Removing deprecated constructor in example code