I have no clue.  The code gets in to meshes and vertices and I get a little lost.  Let me know if/how it can be refactored and I would be happy to implement it.