cleaning layouts node trees