Diffractive optical elements (DOEs) have demonstrated applicability to a wide range of optical problems which cannot be solved with conventional optical elements. DOEs are increasingly becoming solutions for numerous nonconventional imaging tasks such as fan-out gratings and extended imagers. Applications include product marking, machining, robotics, medical diagnostic instruments, alignment instruments, optical computers, and fiber optic switches, to list only a few. However, the phase functions provided by most commercial lens design codes for DOE design lack the generality needed for these nonconventional imaging tasks. The solution taken in the past, of pixelating the aperture and independently varying the phase of every pixel, requires writing a specialized wavefront propagator code since such a phase function is unsuitable for ray tracing codes. We show here new phase functions which are more general than those currently provided in commercial lens design codes but which remain easily adaptable to these codes. Example designs, demonstrating the increased flexibility of these new phase functions, are also shown.