cleanup
refactoring + treenodeoptions