Minor refactoring of comparison of hands