much more memory efficient demo

(still a few memory leaks...)