More work done on the Documents.
Some small changes on the code.