cleaned up getDatabase/getExistingDatabase
changed getDocument() call to createDocument() as getDocument() should always require a document ID