Add on_enter and on_leave spec to traverse
Implement ScopePlugin