Rewrote demo application