Arithmetic of singular moduli and class polynomials