Use native DOM

This commit normalizes the var declarations & uses native DOM.