Remove some unused variables in the triangle basis.