memory leak corrected

many memory leaks corrected so not crashing every time is run.
some problems in the collision, seam to not detect propertly all particles.