Refactored to unify Parser and GenParser packages