Studies on some heterocyclic compounds with potential antibacterial, antitubercular and antileprotic activities