Developing Greener Methods for the Synthesis of Privileged Structural Motifs and Nitrogen Heterocycles