Added additional sector address calculation functions. Fixed SHA1 hashing. Misc fixes