Simplify file parsing code.