Dm upgrades

 - major re-factoring to reduce duplicate code
 - added PIMS object to iterate over images.
```
Parameters
-----------
col : string
   blah blah verbosity blah blah blah
```