Refactor and added test for load order fix.  Fixes #5