change ints to unsigneds, add target hash to verify, minor rewrites and typo fixes
remove write statistics code