Consolidated __eq__ and added missing __hash__