Edit and convert to Python demo.

Not finished yet, needs more work from the FIXME marker.