Started adding polyfills for working with the DOM instead of having to take a dependency on jQuery - #320