Added support for 3D particle positions and fixed little mistakes in simulation limits