AE: Have a bit of a tidy up and also have another debug option for if we want to export all the pulses that get added to the template
AE: A bit more cleaning up and removing debug messages