Some changes of the demonstration code