This paper describes algorithms for the removal of two types of contaminating features in astronomical images. One is background patterns that are spatially fixed (over many exposures) but variable in amplitude. These include fringing and pupil patterns. An algorithm for automatically fitting the pattern amplitude is presented. The second type of contamination consists of non-astronomical (cosmic rays and satellite trails) and astronomical (asteroids) transient sources. An algorithm for detecting and removing these sources from stacked images is also described. Implementations of these algorithms in IRAF are illustrated with data from the NOAO large format mosaic imagers taken by the NOAO Deep-Wide
Field Survey (NDWFS).