Working with most code in ParticleSystem
 finished modularizing, added math.js