Nonlinear surface and internal waves in stratified shear flow