tidy up node drawing code for pulses