replaced iterating over cells's particles by the particlevector, inlined nextParticle and Particle.getX()