correct edi loading errors + a bit of WIP refactoring.