Update example, makefile.
Update example to include proper memory freeing.