Various fixes to examples with predeclared types.

Predeclared types were changed recently, and this commit updates the
examples to fit the new changes.