Refactor response file parsing