Rearrranged demo program a little