Added centering to Particles viewer, corrected bug on maxDet(), small code feractoring, added maxDet to particles for future commits