Refactoring of Parser