Added a visitor pattern.