Improved demo program.