Certain contributions to differential geometry of contact manifolds with riemannian and lorentzian metric