Updated IOHandler to conform to new changes, removed bug in Document.
Updated IOHandlerTest.