Refactoring of some parser classes