Refactors Parser to most generic type