cleaned unused part of code and added deregistration of commands corresponding to trees on shutdown.
cleaned unused part of code and added deregistration of commands corresponding to trees on shutdown.

MartinFrancu/BETS