Synthesis, characterization and therapeutic studies of some heterocyclic compounds and their derivatives