Refactoring to store variable on parser