Cleanup of the demo code