First part of DOM manipulation