Modifications to stop duplicate processing.

Cleanup and mods to stop double-processing files.