Refactored TraverserHook. It is now a class that contains a global.Traverser as val.