Updating source code for demos