Cleanup sha1 code