further improvements; removed the need for array storage of changed DOM elements