Fix a compilation error and simplify some examples

As per IRC.