Calculus of Fractions and Homotopy Theory