Splitting HTMLDocument from Document

* getElementById() returns Element, not HTMLElement
* Reorder and regroup attributes for legibility
* Deprecate non-working or outdated attributes
Merge pull request #46 from greencatsoft/master

Splitting HTMLDocument from Document, and other code clean ups.