Refactor TargetParser.