Removed vert-face finding code duplication and fixed a few bugs.