Added functionality to get phi and theta matrices.