Refactor parsing variables into parsing class