The alternating and non-alternating harmonic sums and other algebraic objects of the same equivalence class are connected by algebraic relations which are induced by the product of these quantities and which depend on their index class rather than on their value. We show how to find a basis of the associated algebra. The length of the basis is found to be , where is the depth of the sums considered and is given by the 2nd {\sc Witt} formula. It can be also determined counting the {\sc Lyndon} words of the respective index set. There are two further classes of relations: structural relations between {\sc Nielsen}--type integrals and relations due to the specific structure of {\sc Feynman} diagrams which lead to a considerable reduction of the set of basic functions. The relations derived can be used to simplify results of higher order calculations in QED and QCD. We also report on results calculating the 16th non--singlet moment of unpolarized structure functions at 3--loop order in the scheme.