Extracted dom interaction into own file

Also added versioning appending to the minified file created during the
build process.