Clean up the demo code a bit.