Refactored some of sha1 module