some file processing refactoring...more to do there still