Refactored parsing process.