Minor cleanups to demo code such as variable renaming.