Immplemented new document wrapper.  Cleaned up current implementation.

8 files changed