Making sharing explicit in examples, and fixing some tests