Updated particlesystem, made it a function