Representations of Virasoro and Kac-Moody algebras: An Algebraic geometrical point of view