Refactoring file parsing.