prepopulate cache from available dom nodes

spaces to tabs

fix text node cleanup