Clean up hash function
Change int to bool