Changed body manager so it uses number of bodies parameter