Fixes crash on opening Treealyzer GUI #2

As crash error was ItemStack cannot be cast to Object, then this seems to be the only solution.

Also updates some comments.