STYLE: avoid shadow variable names, add more doxygen markup STYLE: cull some unused code from triangleFuncs