Minor fixes.
Refactored ParticleSystem class.