Initial implementation of the demo code