Move tree render methods to its own file