Removed warnings and got the example to run correctly