Remove D1 code from most of the demos.
Add a toArray function to Listg and ListSG.