Added caching of nodes to optimize drawing procedures.