Removed unsigned integers.
Avoid index out of range panic trying to retrieve the tree hash when
no data has been written to it.
Reformat imports.
Remove only 3rd party import.