Add a way to get/set the uri on a document
Remove more warnings