Remove unnecessary vars and style cleanup. Adds a few more assertions for IE8 form -> document[0] issue.