Particle fading code improvements