Fix force close issue with MD5 hashing. Code cleanup across the board.