Fully tested for monochromatic input now too.  Should run for either type now.