update comments and code cleanup
keep references to dom elements