Wrapped pulsing in closure to fix mutable key variable.
Removed console.log