Fixed issue with ForEach so example1 transmits spikes correctly

Tidied up & formatted example1