Add deterministic visitor handler to Node
Minor refactorings