Updated the format and cleaned up demo code