Refactoring in some parser classes