refactored tree and method list out of main ui class