Rename cleanVertices and move to prototype