Utilization of ortho fuctionalized aromatic precursors in the synthesis of heterocycles and carbocycles