Refactored type adder and node walker