Fix examples and some tests

Working on remediating all the examples.