Refactored parser module