Demo source code improvements