tweak init functions so they can reference dom nodes directly