Refactored parsing module