Fixed a few of the read state bugs, found a new bug in the hash algorithm where i am trying to access an out of bounds element of an array.