Refactor parser to remove regex format method