Adding render function for tree nodes