Made pulsed configurable + no global var anymore.