Removed testing code.
Added generic implementations for visitors.