The main result of this paper is a new classification theorem for links (smooth embeddings in codimension 2). The classifying space is the rack space and the classifying bundle is the first James bundle. We investigate the algebraic topology of this classifying space and report on calculations given elsewhere. Apart from de. ning many new knot and link invariants (including generalised James-Hopf invariants), the classification theorem has some unexpected applications. We give a combinatorial interpretation for pi(2) of a complex which can be used for calculations and some new interpretations of the higher homotopy groups of the 3-sphere. We also give a cobordism classification of virtual links