Refactoring parsing pipeline