Particle system

Minor fixes and optimisations for large number of nodes. Still not
optimal