cleaned up code for ParticleTest a bit