Lots of new code, for preparing the required data for the demo.