Documentation and a slightly faster hash function