Refactored tree update function out of render.