Changed vec3 to MPoint and MPoint arrays, since this is easier, and used better variable names