was using the 4th selection flag on tri's. also some minor changes, removed unused args and corrected some comments.