Applications of guided waves to nonlinear optics