Reduced number of DOM API calls.