improved writer with options 'encoding' and 'version'
fixed hashification with root
added method readDocument
bumped version