Added a cloneFromMesh function so that P3D can be used to export modified meshes easily. Various bug fixes.