Refactoring file loading.