Reduce accesses to the DOM