Removed O(n^2) triangle calculation. whooops