[cvz/mmcm] A bit of cleaning. Added torus option.