Refactor parser methods