Cleanup and optimization of BarMagnetNode
Global direct reference for requestAnimationFrame