Spatial And Temporal Mode Engineering In Nonlinear Media