JavaDoc and fixed Document

Remade the comments as JavaDoc, removed some bits that are no longer the
responsibility of Document