Wave propagation in anisotropic layered media