Refactor type analysis for procedure/output/operator calls