Rewrote demo to be compatible with non-GPU architectures