changes to nested set class and tidyup