Add visitor pattern and basic traverse functionality
add comments