Refactors Parser class