Simplified document loading code
Further simplifications for document/sheet loading