Added tree generation and rendering